#pragma once
#include "WarePrepare.h"
#include "CVector3.h"
#include "CColor32.h"
#include "IEffectUnitProp.h"
#include "EffectProp.h"

BEGIN_WARE

class CEffectUnitProp : public IEffectUnitProp
{
	friend class CEffectUnit;
public:
	/// IEffectUnitProp
	virtual VBOOL			LoadProp( CWareFileRead& File );
	virtual void			SaveProp( CWareFileWrite& File );

	virtual int32			SetProp( vector< EffectProp* >& PropList );
	virtual void			GetProp( vector< EffectProp* >& PropList );

	virtual uint32			GetAdvanceProp( OffsetMap& Offset, NameMap& Texture,SizeMap& Size, ColorMap& Color, AlphaMap& Alpha );
	virtual void			SetAdvanceProp( OffsetMap& Offset, NameMap& Texture,SizeMap& Size, ColorMap& Color, AlphaMap& Alpha );

	virtual void			RegisterProp() {}

	const NameMap&			GetTextureList()	{ return m_mapTextureFileName; }

protected:

	OffsetMap				m_mapOffset;
	NameMap					m_mapTextureFileName;
	SizeMap					m_mapSize;
	ColorMap				m_mapColor;
	AlphaMap				m_mapAlpha;

	uint32					m_uAdvancePropFlag;
	vector< EffectProp* >	m_vecProps;
};

END_WARE